package com.test.p10proxy.dynnamic_jdk.example01;

import java.lang.reflect.Proxy;

public class Client01 {
    public static void main(String[] args) {
        Star realStart = new RealStar();
        StarHandler handler = new StarHandler(realStart);
        Star proxy = (Star)Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{Star.class}, handler);
        proxy.bookTicket();
        proxy.sing();

    }
}
